<?php
use yii\helpers\Html;
use yii\widgets\LinkPager;

?>
<table>
 <tr>
 	<td>ID</td>
 	<td>名字</td>
 	<td>价格</td>
 	<td>库存</td>
 </tr>
<?php foreach ($models as $key => $value) {?>
	<tr>
		<td><?php echo $value['id']?></td>
		<td><?php echo $value['name']?></td>
		<td><?php echo $value['price']?></td>
		<td><?php echo $value['stock']?></td>
	</tr>

<?php }?>
</table>

<?php 
// 显示分页
echo LinkPager::widget([
    'pagination' => $pages,
]);
?>
<!-- <?php
// $page=isset($_GET['page'])?$_GET['page']:1;

?>
<script src="jq.js"></script>
<script>
 $.ajax({
 	method:'get',
 	url:"",
 	data:{
 		page:page
 	},
 	dataType:'json',
 	success:function(res){
     
 	}
 })



</script> -->